<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
  </head>
  <body>
    <script type="text/javascript">
      /**
       * enmm，ES6新出的语法，就这么写的，没啥要注意的 
       */
      const _symbolKey = (array) => {
        let result = {};
        array.forEach((item) => {
          let key = Symbol(item);
          result[key] = item;
        });
        return result;
      };
      console.log(_symbolKey([1, 2, 3, 4, 5]));
    </script>
  </body>
</html>
